home *** CD-ROM | disk | FTP | other *** search
- AH10233 Control-break - example of changing interrupt vector
-
- 11/11/85
- BASIC Interpreter by Microsoft (6025010)
- BASIC Compiler Version 1.0 (DOS) (6024003)
- Portable Personal Computer System Unit/Keyboard (5155068)
- Personal Computer AT System Unit/Keyboard (5170068, 5170099)
- Personal Computer XT System Unit/Keyboard (5160087)
- PCjr System Unit/Keyboard (4860004, 4860067)
- Personal Computer System Unit/Keyboard (5150114)
- BASIC Compiler Version 2.0 (DOS) (6024216)
- PCjr BASIC (Cartridge) (6024101)
-
- KEYWORDS: INFORMATION
- Following is a program that demonstrates changing an
- interrupt vector from BASIC. The vector being changed is
- the Control-break interrupt vector (interrupt number 1B, the
- Keyboard break interrupt) located at hex address 6C-6F, or
- decimal 108-111. The vector will be changed to the
- Dummy_Return vector, which effectively disables the
- Control-break key. Please see the Technical Reference
- manual for your system unit for more information about
- interrupt vectors.
-
- 10 CLS:DEFINT A-I
- 20 DIM A(4)
- 30 DEF SEG=0
- 40 FOR I=1 TO 4
- 50 A(I)=PEEK(107+I) 'Save old interrupt vector
- 60 NEXT I
- 70 LOCATE 10,18
- 80 PRINT "Press any key to inhibit control-break";
- 90 A$=INKEY$:IF A$="" THEN GOTO 90
- 100 POKE 108,83 'Set to dummy_return vector..
- 110 POKE 109,255
- 120 POKE 110,0
- 130 POKE 111,18
- 140 LOCATE 15,18
- 150 PRINT "Control-break now inhibited - try it";
- 160 LOCATE 16,27
- 170 PRINT "(Press spacebar to exit)";
- 180 A$=INKEY$:IF A$=" " THEN 190 ELSE 180
- 190 FOR I=1 TO 4
- 200 POKE 107+I,A(I) 'Reset old vector
- 210 NEXT I
- 220 LOCATE 20,20
- 230 PRINT "Control-break is back on - try it";
- 240 GOTO 240
- *** END OF DOCUMENT ***
-
- Note : This modification or recommendation has not been subjected to
- exhaustive testing and may not, in all circumstances, provide
- a complete solution.
- sting and may not, in all circumstances, prov